﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DocsControl.ascx.cs" Inherits="RecruitingApplication.Controls.DocsNotes.DocsControl" %>
<div class="DocsControl ui-widget">
    <div style="width:100%; text-align:center;">Documents</div>
    <div class="DocsTableHeader ui-widget-header ui-corner-all">
        <table class="DocsTable" cellspacing="0" cellpadding="0">
            <tr>
                <td class="DocsTableCol1 DocumentInfoHeader">Category</td>
                <td class="DocsTableCol2 DocumentInfoHeader">Name</td>
                <td class="DocsTableCol3 DocumentInfoHeader">Added by</td>
                <td class="DocsTableCol4 DocumentInfoHeader">Date Added</td>
                <td class="DocsTableCol5 DocumentInfoHeader"></td>
            </tr>
        </table>
    </div>
    <ul class="DocumentsList">
        <asp:ListView runat="server" ID="DocsRepeater">
            <ItemTemplate>
                <li><a href="#">
                    <div class="DocumentListItem">
                        <div class="DocumentInfo DocsTableCol1">
                            <span><%# Eval("CategoryName") %></span>
                        </div>
                        <div class="DocumentInfo DocsTableCol2">
                            <span><%# Eval("FileName") %></span>
                        </div>
                        <div class="DocumentInfo DocsTableCol3">
                            <span><%# Eval("Username") %></span>
                        </div>
                        <div class="DocumentInfo DocsTableCol4">
                            <span><%# Eval("DateAdded", "{0:MM/dd/yy}") %></span>
                        </div>
                        <div class="DocumentInfo DocsTableCol5">
                            <button class="BtnDownloadFile" onclick="return OnDownloadDocumentClick(<%# Eval("ID") %>);"></button>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <input type="hidden" class="DocumentID" value='<%# Eval("ID") %>' />
                </a></li>
            </ItemTemplate>
            <EmptyDataTemplate>
                <li>
                    <a href="#">
                        <div class="DocumentListItem">
                            Click 'Upload' to add documents
                        </div>
                    </a>
                </li>
            </EmptyDataTemplate>
        </asp:ListView>
    </ul>
    <button class="BtnUploadFile" onclick="return UploadFileForApp(<%= AppID %>);">Upload</button>
</div>